package com.mapper.db2;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.entity.TeacherTable;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.entity.TeacherTableDto;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author chl
 * @since 2022-03-22
 */
public interface TeacherTableMapper extends BaseMapper<TeacherTable> {


    @Select("select * from teacher_table where id = #{table.id}")
    List<TeacherTable> getList(@Param("table") TeacherTable table);


    List<TeacherTableDto> getPageList(int pageSize, int pageNumber);


    // 通过条件执行
    @Select("select * from teacher_table ${ew.customSqlSegment}")
    List<TeacherTable> getAll(@Param(Constants.WRAPPER) Wrapper wrapper);

    int batchAdd(List<TeacherTable> list);
}
